<script lang="ts" setup>
import { getHealthSX } from '~/api/home'

const inputVal = ref('')
const loading = ref(true)
const list = ref<any[]>([])
const searchValue = ref('')
const hotSearch = ref<any[]>([
  '高血压',
  '糖尿病',
  '冠心病',
  '关节炎',
  '胃炎',
  '哮喘',
  '肝炎',
  '艾滋病',
  '新冠肺炎'
])
// 搜索
function onSearch() {
  searchValue.value = inputVal.value
  // getList()
  navigateTo({
    path: `/peopleHealth/advancedSearch`,
    query: {
      data: searchValue.value
    },
  })
}
function clearInput() {
  inputVal.value = ''
}
function getHealthSxList() {
  getHealthSX().then((res) => {
    loading.value = false
    list.value = res.data
  }).catch(() => {
    loading.value = false
  })
}
function hotSearchClick(item: any) {
  inputVal.value = item
  navigateTo({
        path: `/peopleHealth/advancedSearch`,
        query: {
            data: inputVal.value,
            type: '全部'
        },
    })
}
getHealthSxList()
</script>

<template>
  <div  class="overflow-hidden bg-img">
    <div class="mb-20 mt-35">
      <!-- <div class="text-white w-1200px mx-auto mt-34px text-18px">
        <div>主办单位：陕西省卫生健康委员会
          </div>
        <div class="mt-16px">承办单位：陕西省健康教育中心</div>
      </div> -->
      <!-- <img src="https://xadfz.xa.gov.cn/template/images/common.files/logo.png" alt="" class="w-400px h-200px mx-auto mb-20"/> -->
      <div class="text-center   page-title" text="#AC8358 46px">西 安 地 方 志 办 公 室</div>
      <div flex="~ justify-center items-center">
        <img src="/img/homeico.png" alt="" class="w-20px h-20px transform-rotate-y-180"/>
        <div class="border-b border-#AC8358 w-30%"></div>
        <img src="/img/homeico.png" alt="" class="w-20px h-20px"/>
      </div>
      <PublicSearch type="全部" :isFF="true" />
      <PublicSearchDialog class="mx-5" type="全部" :isBg="true"/>
    </div>
  </div>
</template>

<style scoped>

.page-title{
  font-family: syzt;
  margin-top: 60px;
  font-size: 60px;
  color: #AC8358;
  letter-spacing: 5px;
  transform: scaleX(1.2);
}
.bg-img{
  background-image: url('/img/homebg.png');
  background-repeat: no-repeat;
  background-position: inherit;
  height: 540px;
  width: 100%;
  margin-bottom: 10px;
}
</style>
